<html><head><meta charset="gb2312"/><title>Movie.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Movie example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) 2001 - Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">If</font></b> <font color="#3A3966">InitMovie</font>() = 0
<font color="#3A3966">  MessageRequester</font>("Error", "Can't initialize movie playback !", 0) 
  <b><font color="#3A3966">End</font></b>
<b><font color="#3A3966">EndIf</font></b>

MovieName$ =<font color="#3A3966"> OpenFileRequester</font>("Choose the movie to play", "", "Movie/Audio files|*.avi;*.mpg;*.asf;*.mp3;*.wav|All Files|*.*", 0)
<b><font color="#3A3966">If</font></b> MovieName$
  <b><font color="#3A3966">If</font></b> <font color="#3A3966">LoadMovie</font>(0, MovieName$)
  
<font color="#3A3966">    OpenWindow</font>(0, 100, 150,<font color="#3A3966"> MovieWidth</font>(0),<font color="#3A3966"> MovieHeight</font>(0), "PureBasic - Movie")
<font color="#3A3966">    PlayMovie</font>(0,<font color="#3A3966"> WindowID</font>(0))
      
    <b><font color="#3A3966">Repeat</font></b>
    <b><font color="#3A3966">Until</font></b> <font color="#3A3966">WaitWindowEvent</font>() = <font color="#FF0000">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">Else</font></b>
<font color="#3A3966">    MessageRequester</font>("Error", "Can't load the movie...", 0)
  <b><font color="#3A3966">EndIf</font></b>
<b><font color="#3A3966">EndIf</font></b> </font></pre>
</body></html>
